package com.ssyu.examination.system.entity;

import java.util.Date;

public class CourseEntity {
	private int id;
	private int pid;
	private String text;
	private int operateUserId;
	private Date operateTime;
	private int state;
	private String memo;

	private String user_name;
	private String ptext;
	public CourseEntity() {
		super();
	}

	public CourseEntity(int id, int pid, String text, int operateUserId,
			Date operateTime, int state, String memo, String ptext, String user_name) {
		super();
		this.id = id;
		this.pid = pid;
		this.text = text;
		this.operateUserId = operateUserId;
		this.operateTime = operateTime;
		this.state = state;
		this.memo = memo;
		this.ptext = ptext;
		this.user_name = user_name;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getPid() {
		return pid;
	}

	public void setPid(int pid) {
		this.pid = pid;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public void setState(int state) {
		this.state = state;
	}

	public int getOperateUserId() {
		return operateUserId;
	}

	public void setOperateUserId(int operateUserId) {
		this.operateUserId = operateUserId;
	}

	public Date getOperateTime() {
		return operateTime;
	}

	public void setOperateTime(Date operateTime) {
		this.operateTime = operateTime;
	}

	public String getState() {
		if (state == 1) {
			return "open";
		} else if (state == 2) {
			return "closed";
		}
		return "";
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getPtext() {
		return ptext;
	}

	public void setPtext(String ptext) {
		this.ptext = ptext;
	}

	public String getUser_name() {
		return user_name;
	}

	public void setUser_name(String user_name) {
		this.user_name = user_name;
	}

}
